package org.example.POJO.game;
import org.example.Page.GamePanel;

import java.awt.*;

public class Wang extends Chess {
    public Wang(int camp, Point p) {
        super("wang", camp, p);
    }

    public Wang(int camp, int px) {
        this(camp, new Point(px, 1));
    }

    @Override
    public boolean isAbleMove(Point tp, GamePanel gamePanel) {
        return isLine(tp) > 1 && isInWangGong(tp) && getStep(tp) == 1;
    }
}
